/**
 * Copyright (c) 2023 OceanBase
 * OceanBase CE is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#ifndef FacebookService_H
#define FacebookService_H

#include <thrift/TDispatchProcessor.h>
#include <thrift/async/TConcurrentClientSyncInfo.h>
#include <memory>
#include "fb303_types.h"

namespace facebook { namespace fb303 {

#ifdef _MSC_VER
  #pragma warning( push )
  #pragma warning (disable : 4250 ) //inheriting methods via dominance
#endif

/**
 * Standard base service
 */
class FacebookServiceIf {
 public:
  virtual ~FacebookServiceIf() {}

  /**
   * Returns a descriptive name of the service
   */
  virtual void getName(std::string& _return) = 0;

  /**
   * Returns the version of the service
   */
  virtual void getVersion(std::string& _return) = 0;

  /**
   * Gets the status of this service
   */
  virtual fb_status::type getStatus() = 0;

  /**
   * User friendly description of status, such as why the service is in
   * the dead or warning state, or what is being started or stopped.
   */
  virtual void getStatusDetails(std::string& _return) = 0;

  /**
   * Gets the counters for this service
   */
  virtual void getCounters(std::map<std::string, int64_t> & _return) = 0;

  /**
   * Gets the value of a single counter
   *
   * @param key
   */
  virtual int64_t getCounter(const std::string& key) = 0;

  /**
   * Sets an option
   *
   * @param key
   * @param value
   */
  virtual void setOption(const std::string& key, const std::string& value) = 0;

  /**
   * Gets an option
   *
   * @param key
   */
  virtual void getOption(std::string& _return, const std::string& key) = 0;

  /**
   * Gets all options
   */
  virtual void getOptions(std::map<std::string, std::string> & _return) = 0;

  /**
   * Returns a CPU profile over the given time interval (client and server
   * must agree on the profile format).
   *
   * @param profileDurationInSec
   */
  virtual void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) = 0;

  /**
   * Returns the unix time that the server has been running since
   */
  virtual int64_t aliveSince() = 0;

  /**
   * Tell the server to reload its configuration, reopen log files, etc
   */
  virtual void reinitialize() = 0;

  /**
   * Suggest a shutdown to the server
   */
  virtual void shutdown() = 0;
};

class FacebookServiceIfFactory {
 public:
  typedef FacebookServiceIf Handler;

  virtual ~FacebookServiceIfFactory() {}

  virtual FacebookServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
  virtual void releaseHandler(FacebookServiceIf* /* handler */) = 0;
  };

class FacebookServiceIfSingletonFactory : virtual public FacebookServiceIfFactory {
 public:
  FacebookServiceIfSingletonFactory(const ::std::shared_ptr<FacebookServiceIf>& iface) : iface_(iface) {}
  virtual ~FacebookServiceIfSingletonFactory() {}

  virtual FacebookServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) override {
    return iface_.get();
  }
  virtual void releaseHandler(FacebookServiceIf* /* handler */) override {}

 protected:
  ::std::shared_ptr<FacebookServiceIf> iface_;
};

class FacebookServiceNull : virtual public FacebookServiceIf {
 public:
  virtual ~FacebookServiceNull() {}
  void getName(std::string& /* _return */) override {
    return;
  }
  void getVersion(std::string& /* _return */) override {
    return;
  }
  fb_status::type getStatus() override {
    fb_status::type _return = static_cast<fb_status::type>(0);
    return _return;
  }
  void getStatusDetails(std::string& /* _return */) override {
    return;
  }
  void getCounters(std::map<std::string, int64_t> & /* _return */) override {
    return;
  }
  int64_t getCounter(const std::string& /* key */) override {
    int64_t _return = 0;
    return _return;
  }
  void setOption(const std::string& /* key */, const std::string& /* value */) override {
    return;
  }
  void getOption(std::string& /* _return */, const std::string& /* key */) override {
    return;
  }
  void getOptions(std::map<std::string, std::string> & /* _return */) override {
    return;
  }
  void getCpuProfile(std::string& /* _return */, const int32_t /* profileDurationInSec */) override {
    return;
  }
  int64_t aliveSince() override {
    int64_t _return = 0;
    return _return;
  }
  void reinitialize() override {
    return;
  }
  void shutdown() override {
    return;
  }
};


class FacebookService_getName_args {
 public:

  FacebookService_getName_args(const FacebookService_getName_args&) noexcept;
  FacebookService_getName_args& operator=(const FacebookService_getName_args&) noexcept;
  FacebookService_getName_args() noexcept {
  }

  virtual ~FacebookService_getName_args() noexcept;

  bool operator == (const FacebookService_getName_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getName_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getName_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getName_pargs {
 public:


  virtual ~FacebookService_getName_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getName_result__isset {
  _FacebookService_getName_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getName_result__isset;

class FacebookService_getName_result {
 public:

  FacebookService_getName_result(const FacebookService_getName_result&);
  FacebookService_getName_result& operator=(const FacebookService_getName_result&);
  FacebookService_getName_result() noexcept
                                 : success() {
  }

  virtual ~FacebookService_getName_result() noexcept;
  std::string success;

  _FacebookService_getName_result__isset __isset;

  void __set_success(const std::string& val);

  bool operator == (const FacebookService_getName_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getName_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getName_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getName_presult__isset {
  _FacebookService_getName_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getName_presult__isset;

class FacebookService_getName_presult {
 public:


  virtual ~FacebookService_getName_presult() noexcept;
  std::string* success;

  _FacebookService_getName_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_getVersion_args {
 public:

  FacebookService_getVersion_args(const FacebookService_getVersion_args&) noexcept;
  FacebookService_getVersion_args& operator=(const FacebookService_getVersion_args&) noexcept;
  FacebookService_getVersion_args() noexcept {
  }

  virtual ~FacebookService_getVersion_args() noexcept;

  bool operator == (const FacebookService_getVersion_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getVersion_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getVersion_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getVersion_pargs {
 public:


  virtual ~FacebookService_getVersion_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getVersion_result__isset {
  _FacebookService_getVersion_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getVersion_result__isset;

class FacebookService_getVersion_result {
 public:

  FacebookService_getVersion_result(const FacebookService_getVersion_result&);
  FacebookService_getVersion_result& operator=(const FacebookService_getVersion_result&);
  FacebookService_getVersion_result() noexcept
                                    : success() {
  }

  virtual ~FacebookService_getVersion_result() noexcept;
  std::string success;

  _FacebookService_getVersion_result__isset __isset;

  void __set_success(const std::string& val);

  bool operator == (const FacebookService_getVersion_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getVersion_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getVersion_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getVersion_presult__isset {
  _FacebookService_getVersion_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getVersion_presult__isset;

class FacebookService_getVersion_presult {
 public:


  virtual ~FacebookService_getVersion_presult() noexcept;
  std::string* success;

  _FacebookService_getVersion_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_getStatus_args {
 public:

  FacebookService_getStatus_args(const FacebookService_getStatus_args&) noexcept;
  FacebookService_getStatus_args& operator=(const FacebookService_getStatus_args&) noexcept;
  FacebookService_getStatus_args() noexcept {
  }

  virtual ~FacebookService_getStatus_args() noexcept;

  bool operator == (const FacebookService_getStatus_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getStatus_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getStatus_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getStatus_pargs {
 public:


  virtual ~FacebookService_getStatus_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getStatus_result__isset {
  _FacebookService_getStatus_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getStatus_result__isset;

class FacebookService_getStatus_result {
 public:

  FacebookService_getStatus_result(const FacebookService_getStatus_result&) noexcept;
  FacebookService_getStatus_result& operator=(const FacebookService_getStatus_result&) noexcept;
  FacebookService_getStatus_result() noexcept
                                   : success(static_cast<fb_status::type>(0)) {
  }

  virtual ~FacebookService_getStatus_result() noexcept;
  /**
   *
   * @see fb_status
   */
  fb_status::type success;

  _FacebookService_getStatus_result__isset __isset;

  void __set_success(const fb_status::type val);

  bool operator == (const FacebookService_getStatus_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getStatus_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getStatus_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getStatus_presult__isset {
  _FacebookService_getStatus_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getStatus_presult__isset;

class FacebookService_getStatus_presult {
 public:


  virtual ~FacebookService_getStatus_presult() noexcept;
  /**
   *
   * @see fb_status
   */
  fb_status::type* success;

  _FacebookService_getStatus_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_getStatusDetails_args {
 public:

  FacebookService_getStatusDetails_args(const FacebookService_getStatusDetails_args&) noexcept;
  FacebookService_getStatusDetails_args& operator=(const FacebookService_getStatusDetails_args&) noexcept;
  FacebookService_getStatusDetails_args() noexcept {
  }

  virtual ~FacebookService_getStatusDetails_args() noexcept;

  bool operator == (const FacebookService_getStatusDetails_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getStatusDetails_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getStatusDetails_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getStatusDetails_pargs {
 public:


  virtual ~FacebookService_getStatusDetails_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getStatusDetails_result__isset {
  _FacebookService_getStatusDetails_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getStatusDetails_result__isset;

class FacebookService_getStatusDetails_result {
 public:

  FacebookService_getStatusDetails_result(const FacebookService_getStatusDetails_result&);
  FacebookService_getStatusDetails_result& operator=(const FacebookService_getStatusDetails_result&);
  FacebookService_getStatusDetails_result() noexcept
                                          : success() {
  }

  virtual ~FacebookService_getStatusDetails_result() noexcept;
  std::string success;

  _FacebookService_getStatusDetails_result__isset __isset;

  void __set_success(const std::string& val);

  bool operator == (const FacebookService_getStatusDetails_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getStatusDetails_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getStatusDetails_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getStatusDetails_presult__isset {
  _FacebookService_getStatusDetails_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getStatusDetails_presult__isset;

class FacebookService_getStatusDetails_presult {
 public:


  virtual ~FacebookService_getStatusDetails_presult() noexcept;
  std::string* success;

  _FacebookService_getStatusDetails_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_getCounters_args {
 public:

  FacebookService_getCounters_args(const FacebookService_getCounters_args&) noexcept;
  FacebookService_getCounters_args& operator=(const FacebookService_getCounters_args&) noexcept;
  FacebookService_getCounters_args() noexcept {
  }

  virtual ~FacebookService_getCounters_args() noexcept;

  bool operator == (const FacebookService_getCounters_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getCounters_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCounters_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getCounters_pargs {
 public:


  virtual ~FacebookService_getCounters_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCounters_result__isset {
  _FacebookService_getCounters_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCounters_result__isset;

class FacebookService_getCounters_result {
 public:

  FacebookService_getCounters_result(const FacebookService_getCounters_result&);
  FacebookService_getCounters_result& operator=(const FacebookService_getCounters_result&);
  FacebookService_getCounters_result() noexcept {
  }

  virtual ~FacebookService_getCounters_result() noexcept;
  std::map<std::string, int64_t>  success;

  _FacebookService_getCounters_result__isset __isset;

  void __set_success(const std::map<std::string, int64_t> & val);

  bool operator == (const FacebookService_getCounters_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getCounters_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCounters_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCounters_presult__isset {
  _FacebookService_getCounters_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCounters_presult__isset;

class FacebookService_getCounters_presult {
 public:


  virtual ~FacebookService_getCounters_presult() noexcept;
  std::map<std::string, int64_t> * success;

  _FacebookService_getCounters_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _FacebookService_getCounter_args__isset {
  _FacebookService_getCounter_args__isset() : key(false) {}
  bool key :1;
} _FacebookService_getCounter_args__isset;

class FacebookService_getCounter_args {
 public:

  FacebookService_getCounter_args(const FacebookService_getCounter_args&);
  FacebookService_getCounter_args& operator=(const FacebookService_getCounter_args&);
  FacebookService_getCounter_args() noexcept
                                  : key() {
  }

  virtual ~FacebookService_getCounter_args() noexcept;
  std::string key;

  _FacebookService_getCounter_args__isset __isset;

  void __set_key(const std::string& val);

  bool operator == (const FacebookService_getCounter_args & rhs) const
  {
    if (!(key == rhs.key))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getCounter_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCounter_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getCounter_pargs {
 public:


  virtual ~FacebookService_getCounter_pargs() noexcept;
  const std::string* key;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCounter_result__isset {
  _FacebookService_getCounter_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCounter_result__isset;

class FacebookService_getCounter_result {
 public:

  FacebookService_getCounter_result(const FacebookService_getCounter_result&) noexcept;
  FacebookService_getCounter_result& operator=(const FacebookService_getCounter_result&) noexcept;
  FacebookService_getCounter_result() noexcept
                                    : success(0) {
  }

  virtual ~FacebookService_getCounter_result() noexcept;
  int64_t success;

  _FacebookService_getCounter_result__isset __isset;

  void __set_success(const int64_t val);

  bool operator == (const FacebookService_getCounter_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getCounter_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCounter_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCounter_presult__isset {
  _FacebookService_getCounter_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCounter_presult__isset;

class FacebookService_getCounter_presult {
 public:


  virtual ~FacebookService_getCounter_presult() noexcept;
  int64_t* success;

  _FacebookService_getCounter_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _FacebookService_setOption_args__isset {
  _FacebookService_setOption_args__isset() : key(false), value(false) {}
  bool key :1;
  bool value :1;
} _FacebookService_setOption_args__isset;

class FacebookService_setOption_args {
 public:

  FacebookService_setOption_args(const FacebookService_setOption_args&);
  FacebookService_setOption_args& operator=(const FacebookService_setOption_args&);
  FacebookService_setOption_args() noexcept
                                 : key(),
                                   value() {
  }

  virtual ~FacebookService_setOption_args() noexcept;
  std::string key;
  std::string value;

  _FacebookService_setOption_args__isset __isset;

  void __set_key(const std::string& val);

  void __set_value(const std::string& val);

  bool operator == (const FacebookService_setOption_args & rhs) const
  {
    if (!(key == rhs.key))
      return false;
    if (!(value == rhs.value))
      return false;
    return true;
  }
  bool operator != (const FacebookService_setOption_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_setOption_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_setOption_pargs {
 public:


  virtual ~FacebookService_setOption_pargs() noexcept;
  const std::string* key;
  const std::string* value;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_setOption_result {
 public:

  FacebookService_setOption_result(const FacebookService_setOption_result&) noexcept;
  FacebookService_setOption_result& operator=(const FacebookService_setOption_result&) noexcept;
  FacebookService_setOption_result() noexcept {
  }

  virtual ~FacebookService_setOption_result() noexcept;

  bool operator == (const FacebookService_setOption_result & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_setOption_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_setOption_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_setOption_presult {
 public:


  virtual ~FacebookService_setOption_presult() noexcept;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _FacebookService_getOption_args__isset {
  _FacebookService_getOption_args__isset() : key(false) {}
  bool key :1;
} _FacebookService_getOption_args__isset;

class FacebookService_getOption_args {
 public:

  FacebookService_getOption_args(const FacebookService_getOption_args&);
  FacebookService_getOption_args& operator=(const FacebookService_getOption_args&);
  FacebookService_getOption_args() noexcept
                                 : key() {
  }

  virtual ~FacebookService_getOption_args() noexcept;
  std::string key;

  _FacebookService_getOption_args__isset __isset;

  void __set_key(const std::string& val);

  bool operator == (const FacebookService_getOption_args & rhs) const
  {
    if (!(key == rhs.key))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getOption_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getOption_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getOption_pargs {
 public:


  virtual ~FacebookService_getOption_pargs() noexcept;
  const std::string* key;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getOption_result__isset {
  _FacebookService_getOption_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getOption_result__isset;

class FacebookService_getOption_result {
 public:

  FacebookService_getOption_result(const FacebookService_getOption_result&);
  FacebookService_getOption_result& operator=(const FacebookService_getOption_result&);
  FacebookService_getOption_result() noexcept
                                   : success() {
  }

  virtual ~FacebookService_getOption_result() noexcept;
  std::string success;

  _FacebookService_getOption_result__isset __isset;

  void __set_success(const std::string& val);

  bool operator == (const FacebookService_getOption_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getOption_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getOption_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getOption_presult__isset {
  _FacebookService_getOption_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getOption_presult__isset;

class FacebookService_getOption_presult {
 public:


  virtual ~FacebookService_getOption_presult() noexcept;
  std::string* success;

  _FacebookService_getOption_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_getOptions_args {
 public:

  FacebookService_getOptions_args(const FacebookService_getOptions_args&) noexcept;
  FacebookService_getOptions_args& operator=(const FacebookService_getOptions_args&) noexcept;
  FacebookService_getOptions_args() noexcept {
  }

  virtual ~FacebookService_getOptions_args() noexcept;

  bool operator == (const FacebookService_getOptions_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_getOptions_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getOptions_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getOptions_pargs {
 public:


  virtual ~FacebookService_getOptions_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getOptions_result__isset {
  _FacebookService_getOptions_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getOptions_result__isset;

class FacebookService_getOptions_result {
 public:

  FacebookService_getOptions_result(const FacebookService_getOptions_result&);
  FacebookService_getOptions_result& operator=(const FacebookService_getOptions_result&);
  FacebookService_getOptions_result() noexcept {
  }

  virtual ~FacebookService_getOptions_result() noexcept;
  std::map<std::string, std::string>  success;

  _FacebookService_getOptions_result__isset __isset;

  void __set_success(const std::map<std::string, std::string> & val);

  bool operator == (const FacebookService_getOptions_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getOptions_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getOptions_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getOptions_presult__isset {
  _FacebookService_getOptions_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getOptions_presult__isset;

class FacebookService_getOptions_presult {
 public:


  virtual ~FacebookService_getOptions_presult() noexcept;
  std::map<std::string, std::string> * success;

  _FacebookService_getOptions_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _FacebookService_getCpuProfile_args__isset {
  _FacebookService_getCpuProfile_args__isset() : profileDurationInSec(false) {}
  bool profileDurationInSec :1;
} _FacebookService_getCpuProfile_args__isset;

class FacebookService_getCpuProfile_args {
 public:

  FacebookService_getCpuProfile_args(const FacebookService_getCpuProfile_args&) noexcept;
  FacebookService_getCpuProfile_args& operator=(const FacebookService_getCpuProfile_args&) noexcept;
  FacebookService_getCpuProfile_args() noexcept
                                     : profileDurationInSec(0) {
  }

  virtual ~FacebookService_getCpuProfile_args() noexcept;
  int32_t profileDurationInSec;

  _FacebookService_getCpuProfile_args__isset __isset;

  void __set_profileDurationInSec(const int32_t val);

  bool operator == (const FacebookService_getCpuProfile_args & rhs) const
  {
    if (!(profileDurationInSec == rhs.profileDurationInSec))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getCpuProfile_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCpuProfile_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_getCpuProfile_pargs {
 public:


  virtual ~FacebookService_getCpuProfile_pargs() noexcept;
  const int32_t* profileDurationInSec;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCpuProfile_result__isset {
  _FacebookService_getCpuProfile_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCpuProfile_result__isset;

class FacebookService_getCpuProfile_result {
 public:

  FacebookService_getCpuProfile_result(const FacebookService_getCpuProfile_result&);
  FacebookService_getCpuProfile_result& operator=(const FacebookService_getCpuProfile_result&);
  FacebookService_getCpuProfile_result() noexcept
                                       : success() {
  }

  virtual ~FacebookService_getCpuProfile_result() noexcept;
  std::string success;

  _FacebookService_getCpuProfile_result__isset __isset;

  void __set_success(const std::string& val);

  bool operator == (const FacebookService_getCpuProfile_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_getCpuProfile_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_getCpuProfile_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_getCpuProfile_presult__isset {
  _FacebookService_getCpuProfile_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_getCpuProfile_presult__isset;

class FacebookService_getCpuProfile_presult {
 public:


  virtual ~FacebookService_getCpuProfile_presult() noexcept;
  std::string* success;

  _FacebookService_getCpuProfile_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_aliveSince_args {
 public:

  FacebookService_aliveSince_args(const FacebookService_aliveSince_args&) noexcept;
  FacebookService_aliveSince_args& operator=(const FacebookService_aliveSince_args&) noexcept;
  FacebookService_aliveSince_args() noexcept {
  }

  virtual ~FacebookService_aliveSince_args() noexcept;

  bool operator == (const FacebookService_aliveSince_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_aliveSince_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_aliveSince_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_aliveSince_pargs {
 public:


  virtual ~FacebookService_aliveSince_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_aliveSince_result__isset {
  _FacebookService_aliveSince_result__isset() : success(false) {}
  bool success :1;
} _FacebookService_aliveSince_result__isset;

class FacebookService_aliveSince_result {
 public:

  FacebookService_aliveSince_result(const FacebookService_aliveSince_result&) noexcept;
  FacebookService_aliveSince_result& operator=(const FacebookService_aliveSince_result&) noexcept;
  FacebookService_aliveSince_result() noexcept
                                    : success(0) {
  }

  virtual ~FacebookService_aliveSince_result() noexcept;
  int64_t success;

  _FacebookService_aliveSince_result__isset __isset;

  void __set_success(const int64_t val);

  bool operator == (const FacebookService_aliveSince_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const FacebookService_aliveSince_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_aliveSince_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _FacebookService_aliveSince_presult__isset {
  _FacebookService_aliveSince_presult__isset() : success(false) {}
  bool success :1;
} _FacebookService_aliveSince_presult__isset;

class FacebookService_aliveSince_presult {
 public:


  virtual ~FacebookService_aliveSince_presult() noexcept;
  int64_t* success;

  _FacebookService_aliveSince_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class FacebookService_reinitialize_args {
 public:

  FacebookService_reinitialize_args(const FacebookService_reinitialize_args&) noexcept;
  FacebookService_reinitialize_args& operator=(const FacebookService_reinitialize_args&) noexcept;
  FacebookService_reinitialize_args() noexcept {
  }

  virtual ~FacebookService_reinitialize_args() noexcept;

  bool operator == (const FacebookService_reinitialize_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_reinitialize_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_reinitialize_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_reinitialize_pargs {
 public:


  virtual ~FacebookService_reinitialize_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_shutdown_args {
 public:

  FacebookService_shutdown_args(const FacebookService_shutdown_args&) noexcept;
  FacebookService_shutdown_args& operator=(const FacebookService_shutdown_args&) noexcept;
  FacebookService_shutdown_args() noexcept {
  }

  virtual ~FacebookService_shutdown_args() noexcept;

  bool operator == (const FacebookService_shutdown_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const FacebookService_shutdown_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FacebookService_shutdown_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class FacebookService_shutdown_pargs {
 public:


  virtual ~FacebookService_shutdown_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

class FacebookServiceClient : virtual public FacebookServiceIf {
 public:
  FacebookServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
    setProtocol(prot);
  }
  FacebookServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    setProtocol(iprot,oprot);
  }
 private:
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
  setProtocol(prot,prot);
  }
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    piprot_=iprot;
    poprot_=oprot;
    iprot_ = iprot.get();
    oprot_ = oprot.get();
  }
 public:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  /**
   * Returns a descriptive name of the service
   */
  void getName(std::string& _return) override;
  void send_getName();
  void recv_getName(std::string& _return);
  /**
   * Returns the version of the service
   */
  void getVersion(std::string& _return) override;
  void send_getVersion();
  void recv_getVersion(std::string& _return);
  /**
   * Gets the status of this service
   */
  fb_status::type getStatus() override;
  void send_getStatus();
  fb_status::type recv_getStatus();
  /**
   * User friendly description of status, such as why the service is in
   * the dead or warning state, or what is being started or stopped.
   */
  void getStatusDetails(std::string& _return) override;
  void send_getStatusDetails();
  void recv_getStatusDetails(std::string& _return);
  /**
   * Gets the counters for this service
   */
  void getCounters(std::map<std::string, int64_t> & _return) override;
  void send_getCounters();
  void recv_getCounters(std::map<std::string, int64_t> & _return);
  /**
   * Gets the value of a single counter
   *
   * @param key
   */
  int64_t getCounter(const std::string& key) override;
  void send_getCounter(const std::string& key);
  int64_t recv_getCounter();
  /**
   * Sets an option
   *
   * @param key
   * @param value
   */
  void setOption(const std::string& key, const std::string& value) override;
  void send_setOption(const std::string& key, const std::string& value);
  void recv_setOption();
  /**
   * Gets an option
   *
   * @param key
   */
  void getOption(std::string& _return, const std::string& key) override;
  void send_getOption(const std::string& key);
  void recv_getOption(std::string& _return);
  /**
   * Gets all options
   */
  void getOptions(std::map<std::string, std::string> & _return) override;
  void send_getOptions();
  void recv_getOptions(std::map<std::string, std::string> & _return);
  /**
   * Returns a CPU profile over the given time interval (client and server
   * must agree on the profile format).
   *
   * @param profileDurationInSec
   */
  void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) override;
  void send_getCpuProfile(const int32_t profileDurationInSec);
  void recv_getCpuProfile(std::string& _return);
  /**
   * Returns the unix time that the server has been running since
   */
  int64_t aliveSince() override;
  void send_aliveSince();
  int64_t recv_aliveSince();
  /**
   * Tell the server to reload its configuration, reopen log files, etc
   */
  void reinitialize() override;
  void send_reinitialize();
  /**
   * Suggest a shutdown to the server
   */
  void shutdown() override;
  void send_shutdown();
 protected:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
  ::apache::thrift::protocol::TProtocol* iprot_;
  ::apache::thrift::protocol::TProtocol* oprot_;
};

class FacebookServiceProcessor : public ::apache::thrift::TDispatchProcessor {
 protected:
  ::std::shared_ptr<FacebookServiceIf> iface_;
  virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) override;
 private:
  typedef  void (FacebookServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
  typedef std::map<std::string, ProcessFunction> ProcessMap;
  ProcessMap processMap_;
  void process_getName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getVersion(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getStatusDetails(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getCounters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getCounter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_setOption(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getOption(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getOptions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getCpuProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_aliveSince(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_reinitialize(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_shutdown(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
 public:
  FacebookServiceProcessor(::std::shared_ptr<FacebookServiceIf> iface) :
    iface_(iface) {
    processMap_["getName"] = &FacebookServiceProcessor::process_getName;
    processMap_["getVersion"] = &FacebookServiceProcessor::process_getVersion;
    processMap_["getStatus"] = &FacebookServiceProcessor::process_getStatus;
    processMap_["getStatusDetails"] = &FacebookServiceProcessor::process_getStatusDetails;
    processMap_["getCounters"] = &FacebookServiceProcessor::process_getCounters;
    processMap_["getCounter"] = &FacebookServiceProcessor::process_getCounter;
    processMap_["setOption"] = &FacebookServiceProcessor::process_setOption;
    processMap_["getOption"] = &FacebookServiceProcessor::process_getOption;
    processMap_["getOptions"] = &FacebookServiceProcessor::process_getOptions;
    processMap_["getCpuProfile"] = &FacebookServiceProcessor::process_getCpuProfile;
    processMap_["aliveSince"] = &FacebookServiceProcessor::process_aliveSince;
    processMap_["reinitialize"] = &FacebookServiceProcessor::process_reinitialize;
    processMap_["shutdown"] = &FacebookServiceProcessor::process_shutdown;
  }

  virtual ~FacebookServiceProcessor() {}
};

class FacebookServiceProcessorFactory : public ::apache::thrift::TProcessorFactory {
 public:
  FacebookServiceProcessorFactory(const ::std::shared_ptr< FacebookServiceIfFactory >& handlerFactory) noexcept :
      handlerFactory_(handlerFactory) {}

  ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) override;

 protected:
  ::std::shared_ptr< FacebookServiceIfFactory > handlerFactory_;
};

class FacebookServiceMultiface : virtual public FacebookServiceIf {
 public:
  FacebookServiceMultiface(std::vector<std::shared_ptr<FacebookServiceIf> >& ifaces) : ifaces_(ifaces) {
  }
  virtual ~FacebookServiceMultiface() {}
 protected:
  std::vector<std::shared_ptr<FacebookServiceIf> > ifaces_;
  FacebookServiceMultiface() {}
  void add(::std::shared_ptr<FacebookServiceIf> iface) {
    ifaces_.push_back(iface);
  }
 public:
  /**
   * Returns a descriptive name of the service
   */
  void getName(std::string& _return) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getName(_return);
    }
    ifaces_[i]->getName(_return);
    return;
  }

  /**
   * Returns the version of the service
   */
  void getVersion(std::string& _return) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getVersion(_return);
    }
    ifaces_[i]->getVersion(_return);
    return;
  }

  /**
   * Gets the status of this service
   */
  fb_status::type getStatus() override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getStatus();
    }
    return ifaces_[i]->getStatus();
  }

  /**
   * User friendly description of status, such as why the service is in
   * the dead or warning state, or what is being started or stopped.
   */
  void getStatusDetails(std::string& _return) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getStatusDetails(_return);
    }
    ifaces_[i]->getStatusDetails(_return);
    return;
  }

  /**
   * Gets the counters for this service
   */
  void getCounters(std::map<std::string, int64_t> & _return) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getCounters(_return);
    }
    ifaces_[i]->getCounters(_return);
    return;
  }

  /**
   * Gets the value of a single counter
   *
   * @param key
   */
  int64_t getCounter(const std::string& key) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getCounter(key);
    }
    return ifaces_[i]->getCounter(key);
  }

  /**
   * Sets an option
   *
   * @param key
   * @param value
   */
  void setOption(const std::string& key, const std::string& value) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->setOption(key, value);
    }
    ifaces_[i]->setOption(key, value);
  }

  /**
   * Gets an option
   *
   * @param key
   */
  void getOption(std::string& _return, const std::string& key) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getOption(_return, key);
    }
    ifaces_[i]->getOption(_return, key);
    return;
  }

  /**
   * Gets all options
   */
  void getOptions(std::map<std::string, std::string> & _return) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getOptions(_return);
    }
    ifaces_[i]->getOptions(_return);
    return;
  }

  /**
   * Returns a CPU profile over the given time interval (client and server
   * must agree on the profile format).
   *
   * @param profileDurationInSec
   */
  void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getCpuProfile(_return, profileDurationInSec);
    }
    ifaces_[i]->getCpuProfile(_return, profileDurationInSec);
    return;
  }

  /**
   * Returns the unix time that the server has been running since
   */
  int64_t aliveSince() override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->aliveSince();
    }
    return ifaces_[i]->aliveSince();
  }

  /**
   * Tell the server to reload its configuration, reopen log files, etc
   */
  void reinitialize() override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->reinitialize();
    }
    ifaces_[i]->reinitialize();
  }

  /**
   * Suggest a shutdown to the server
   */
  void shutdown() override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->shutdown();
    }
    ifaces_[i]->shutdown();
  }

};

// The 'concurrent' client is a thread safe client that correctly handles
// out of order responses.  It is slower than the regular client, so should
// only be used when you need to share a connection among multiple threads
class FacebookServiceConcurrentClient : virtual public FacebookServiceIf {
 public:
  FacebookServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(prot);
  }
  FacebookServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot, std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(iprot,oprot);
  }
 private:
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
  setProtocol(prot,prot);
  }
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    piprot_=iprot;
    poprot_=oprot;
    iprot_ = iprot.get();
    oprot_ = oprot.get();
  }
 public:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  /**
   * Returns a descriptive name of the service
   */
  void getName(std::string& _return) override;
  int32_t send_getName();
  void recv_getName(std::string& _return, const int32_t seqid);
  /**
   * Returns the version of the service
   */
  void getVersion(std::string& _return) override;
  int32_t send_getVersion();
  void recv_getVersion(std::string& _return, const int32_t seqid);
  /**
   * Gets the status of this service
   */
  fb_status::type getStatus() override;
  int32_t send_getStatus();
  fb_status::type recv_getStatus(const int32_t seqid);
  /**
   * User friendly description of status, such as why the service is in
   * the dead or warning state, or what is being started or stopped.
   */
  void getStatusDetails(std::string& _return) override;
  int32_t send_getStatusDetails();
  void recv_getStatusDetails(std::string& _return, const int32_t seqid);
  /**
   * Gets the counters for this service
   */
  void getCounters(std::map<std::string, int64_t> & _return) override;
  int32_t send_getCounters();
  void recv_getCounters(std::map<std::string, int64_t> & _return, const int32_t seqid);
  /**
   * Gets the value of a single counter
   *
   * @param key
   */
  int64_t getCounter(const std::string& key) override;
  int32_t send_getCounter(const std::string& key);
  int64_t recv_getCounter(const int32_t seqid);
  /**
   * Sets an option
   *
   * @param key
   * @param value
   */
  void setOption(const std::string& key, const std::string& value) override;
  int32_t send_setOption(const std::string& key, const std::string& value);
  void recv_setOption(const int32_t seqid);
  /**
   * Gets an option
   *
   * @param key
   */
  void getOption(std::string& _return, const std::string& key) override;
  int32_t send_getOption(const std::string& key);
  void recv_getOption(std::string& _return, const int32_t seqid);
  /**
   * Gets all options
   */
  void getOptions(std::map<std::string, std::string> & _return) override;
  int32_t send_getOptions();
  void recv_getOptions(std::map<std::string, std::string> & _return, const int32_t seqid);
  /**
   * Returns a CPU profile over the given time interval (client and server
   * must agree on the profile format).
   *
   * @param profileDurationInSec
   */
  void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) override;
  int32_t send_getCpuProfile(const int32_t profileDurationInSec);
  void recv_getCpuProfile(std::string& _return, const int32_t seqid);
  /**
   * Returns the unix time that the server has been running since
   */
  int64_t aliveSince() override;
  int32_t send_aliveSince();
  int64_t recv_aliveSince(const int32_t seqid);
  /**
   * Tell the server to reload its configuration, reopen log files, etc
   */
  void reinitialize() override;
  void send_reinitialize();
  /**
   * Suggest a shutdown to the server
   */
  void shutdown() override;
  void send_shutdown();
 protected:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
  ::apache::thrift::protocol::TProtocol* iprot_;
  ::apache::thrift::protocol::TProtocol* oprot_;
  std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync_;
};

#ifdef _MSC_VER
  #pragma warning( pop )
#endif

}} // namespace

#endif
